import { Token_Key } from '@/config'
import { useAppSelector } from '@/store/hooks'
import { notification } from 'antd'
import { useEffect } from 'react'
import './index.less'
const Index: React.FC = () => {
  const user_info = useAppSelector((state) => state.user.user_info)
  useEffect(() => {
    if (window.innerWidth < 1500) {
      notification.open({
        type: 'warning',
        message: '为了提升您的浏览体验，建议调整页面缩放比例(快捷键：ctrl+减号)，以更好地查看页面信息。',
      })
    }
  }, [])
  const token = window.localStorage.getItem(Token_Key)
  const origin =
    window.location.origin.indexOf('https://sop.7sef.com') > -1 ? 'https://msop.7sef.com' : 'https://msoptest.7sef.com'
  return (
    <div className="monitor_quantity_wrap">
      <iframe
        src={origin + '/#/pages/monitor/quantity?token=' + token + '&orgId=' + user_info.orgId}
        width={390}
        height={844}
        frameBorder="0"
      ></iframe>
    </div>
  )
}
export default Index
